#include "thread_pool.hpp"
#include "task.hpp"

#include <ctime>
#include <string>
#include <cstdlib>

int main()
{
    qds::thread_pool<qds::task>* tp = new qds::thread_pool<qds::task>(3);
    tp->init_thread_pool();
    srand((long long)time(nullptr));

    while(true)
    {
        int x = rand() % 100 + 1;
        int y = rand() % 100 + 1;
        const std::string operat = "+-*/%";
        char op = operat[rand() % operat.size()];
        
        qds::task t(x, y, op);
        sleep(1);
        tp->push_task(t);
    }
    return 0;
}
